package com.cuit.mimall.mapper;

import com.cuit.mimall.entity.SeckillTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author TeaWu
 * @since 2023-07-04
 */
public interface SeckillTimeMapper extends BaseMapper<SeckillTime> {
    @Delete("delete from seckill_time")
    void deleteAll();

    @Select("select * from seckill_time where end_time > #{time} limit 6")
    List<SeckillTime> getSkillTime(long time);
}
